fix(sync): VMs reach Installed only via the agent handoff, never Proxmox power#32
Merged
Merged
Conversation
…mox power Proxmox "running" means powered-on, not installed. A QEMU VM can be running the install environment, mid-install, or the installed OS, and Proxmox cannot tell which. apply_proxmox_vm_state mapped "running" -> Installed (#26/#28), conflating power state with install state. That let Jetpack's idempotent re-run reimage freshly-built, working nodes: a re-run saw a VM as not-truly-Installed and reimaged it, wiping the cluster. The authoritative Installed mark is the workflow's reboot/kexec action_started handler in api.rs -- the instant the pre-boot agent is about to hand off to the finished OS. That path is unchanged and is now the sole source of Installed for VMs. apply_proxmox_vm_state now reflects power state only: stopped -> Offline; everything else leaves the install state untouched (never asserts Installed, never completes os_installed / installation_progress). LXC is unaffected -- a container *is* its OS, so running -> Installed stays correct there. The 4 sync tests are updated to the new contract. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Proxmox
runningmeans powered-on, not installed. A QEMU VM can berunning the install environment, mid-install, or the installed OS — and
Proxmox cannot tell which.
apply_proxmox_vm_statemappedrunning→Installed(#26 / #28), conflating power state with install state. That letJetpack's idempotent re-run reimage freshly-built, working nodes: a re-run
saw a VM as not-truly-
Installedand reimaged it, wiping the cluster.Fix
The authoritative
Installedmark is the workflow'sreboot/kexecaction_startedhandler inapi.rs— the instant the pre-boot agent is aboutto hand off to the finished OS. That path is unchanged and is now the sole
source of
Installedfor VMs.apply_proxmox_vm_statenow reflects power state only:stopped→OfflineInstalled,never completes
os_installed/installation_progress)LXC is unaffected — a container is its OS, so
running→Installedstayscorrect there.
The 4 sync tests are updated to the new contract.
🤖 Generated with Claude Code